/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package FactoryMethod;

import java.util.Random;

/**
 *
 * @author CUC103AF08
 */
public class Forms {
public static void main(String[] args)
{
FormCreator[] fc={new CrearEgresos(),new CrearIngresos()};
Random rand= new Random();
    for (int i = 0; i < 100; i++) {
       int k=rand.nextInt(2);
       Formulario f= fc[k].crearFormulario();
       System.out.println("Titulo  "+f.getNombre()+"  Campos "+f.getNumCampos());

    }

}
}
